﻿using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations.Schema;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MesBSW.DAL.MesDB
{
    /// <summary>
    /// 工单状态表
    /// </summary>
    [Serializable]
    [Table("status_info")]
    public class StatusInfo
    {
        /// <summary>
        /// ID，主键，自增长
        /// </summary>
        [Column("id"), Key, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int ID { get; set; }

        /// <summary>
        /// 状态类型
        /// </summary>
        [Column("stype_id")]
        public int StypeID { get; set; }

        /// <summary>
        /// 状态代号
        /// </summary>
        [Column("status_code")]
        public string StatusCode { get; set; }

        /// <summary>
        /// 状态值
        /// </summary>
        [Column("status_value")]
        public string StatusValue { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        [Column("sort")]
        public int? Sort { get; set; }


        /// <summary>
        /// 处理方式，1代表需要在当大站结束异常；2代表需要在最后工序扫码时结束。只针对异常使用
        /// </summary>
        [Column("disp_type")]
        public int? DispType { get; set; }

        /// <summary>
        /// 建档人
        /// </summary>
        [Column("create_user")]
        public string CreateUser { get; set; }

        /// <summary>
        /// 建档日期
        /// </summary>
        [Column("create_date")]
        public DateTime? CreateDate { get; set; }

        /// <summary>
        /// 状态种类名
        /// </summary>
        [NotMapped]
        public string StypeName { get; set; }

    }
}
